#ifndef __UM_RTSP_PACK_H__
#define __UM_RTSP_PACK_H__
#include "um_basic_types.h"
#include "umapi_os_list.h"
#include "umServer.h"
typedef enum {
	E_OPTIONS = 1,
	E_DESCRIBE,
	E_GET_PARAMETER,
	E_PLAY,
	E_SETUP,
	E_PAUSE,
	E_TEARDOWN,
	E_SET_PARAMETER
} RTSPCMD;

typedef struct
{
	struct umapi_list_head node;	
	UM_S32 lineLen;
	UM_CHAR *line;
}RtspLine;

typedef struct
{
	RtspLine lines;
	UM_S32 contextLen;
	UM_S32 cseq;
	RTSPCMD method;
	UM_CHAR url[100];
	UM_CHAR version[16];
	UM_VOID *data;
}RtspPack;



UM_S32 readRtspPack(UM_HANDLE socket, RtspPack **pRtspPack);
UM_VOID freeRtspPack(RtspPack *pRtspPack);
UM_S32 readRtspPackCseq(RtspPack *pRtspPack);
UM_S32 readRtspPackLine(RtspPack *pRtspPack, UM_CHAR *key,UM_CHAR **pline, UM_S32 *plen);
UM_S32 readRtspPackContext(RtspPack *pRtspPack, UM_VOID **pContext, UM_S32 *pContextLen);
UM_S32 toString(RtspPack *pRtspPack, UM_CHAR *headBuff);
#endif
